package top.truism.fund.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class FundController {

    @PostMapping("/fund/balance/{userId}/{balanceAmount}")
    public String deductingBalance(
            @PathVariable("userId") String userId,
            @PathVariable("balanceAmount") Long balanceAmount,
            HttpServletRequest request
    ) {

        return "端口: " + request.getServerPort() + "扣减库存成功";

    }

}
